@header-trigger-prefix-cls: ~"@{namespace}-layout-header-trigger";
@header-prefix-cls: ~"@{namespace}-layout-header";
@breadcrumb-prefix-cls: ~"@{namespace}-layout-breadcrumb";
@logo-prefix-cls: ~"@{namespace}-app-logo";

.@{header-prefix-cls} {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: @white !important;
  background-color: @header-bg-color !important;
  z-index: 1;
  box-shadow: 0 0 6px 0 rgba(0, 0, 0, 0.1);

  &--mobile {
    .@{breadcrumb-prefix-cls},
    .error-action,
    .notify-item,
    .fullscreen-item {
      display: none;
    }

    .@{logo-prefix-cls} {
      min-width: unset;
      padding-right: 0;

      &__title {
        display: none;
      }
    }

    .@{header-trigger-prefix-cls} {
      padding: 0 4px 0 8px !important;
    }

    .@{header-prefix-cls}-action {
      padding-right: 2px;

      &__item {
        margin: 1px;
        padding: 6px;
      }

      .ant-divider {
        margin: 2px;
      }
    }
  }

  &--fixed {
    position: fixed;
    top: 0;
    left: 0;
    z-index: @layout-header-fixed-z-index;
    width: 100%;
  }

  &-logo {
    height: @header-height;
    padding: 0 10px;
    font-size: 14px;
    border-radius: 8px;

    img {
      width: @logo-width;
      height: @logo-width;
      margin-right: 2px;
    }

    &:hover {
      background-color: @header-bg-hover-color;
    }
  }

  &-left {
    display: flex;
    height: 100%;
    align-items: center;

    .@{header-trigger-prefix-cls} {
      display: flex;
      height: 100%;
      padding: 1px 10px 0;
      cursor: pointer;
      align-items: center;

      .anticon {
        font-size: 16px;
      }

      &:hover {
        background-color: @header-bg-hover-color;
      }

      &.light {
        svg {
          fill: @black;
        }
      }
    }
  }

  &-menu {
    height: 100%;
    min-width: 0;
    flex: 1;
    align-items: center;

    & li {
      border-radius: 8px !important;
      transition: background 0.5s ease !important;

      &:hover {
        background-color: @header-bg-hover-color !important;
      }
    }
  }

  &-action {
    display: flex;
    min-width: 120px;
    align-items: center;

    &__item {
      display: flex !important;
      justify-content: center;
      align-items: center;
      transition: background 0.5s ease;
      height: 28px;
      border-radius: 14px;
      margin: 2px;
      padding: 6px;
      font-size: 14px;
      color: @header-color;
      cursor: pointer;

      &:hover {
        background-color: @header-bg-hover-color;
      }
    }

    .ant-divider {
      height: 16px;
      background-color: @border-color-base;
    }
  }

  &--dark {
    box-shadow: 0 0 6px 0 @trigger-dark-bg-color;

    .ant-divider {
      background-color: @trigger-dark-bg-color;
    }
  }
}
